<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>修改栏目 - 听到微笑的博客</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/style.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/font-awesome.min.css">
<link rel="apple-touch-icon-precomposed" href="${pageContext.request.contextPath }/images/icon/icon.png">
<link rel="shortcut icon" href="${pageContext.request.contextPath }/images/icon/favicon.ico">
<script src="${pageContext.request.contextPath }/js/jquery-2.1.4.min.js"></script>
</head>
<body class="user-select">
	<section class="container-fluid">
		<jsp:include page="common/top.jsp"></jsp:include>
		<div class="row">
			<jsp:include page="common/left.jsp"></jsp:include>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
				<div class="row">
					<div class="col-md-8">
						<h1 class="page-header">添加</h1>
						<form action="${pageContext.request.contextPath }/category/update.action" method="post" autocomplete="off">
							<input type="hidden" name="id" value="${category.id }">
							<div class="form-group">
								<label for="category-name">栏目名称</label> <input type="text" id="category-name" name="name" value="${category.name }" class="form-control" placeholder="在此处输入栏目名称" required autocomplete="off">
								<span class="prompt-text">这将是它在站点上显示的名字。</span>
							</div>
							<div class="form-group">
								<label for="category-alias">栏目别名</label> <input type="text" id="category-alias" name="alias" value="${category.alias }" class="form-control" placeholder="在此处输入栏目别名" required autocomplete="off">
								<span class="prompt-text">“别名”是在URL中使用的别称，它可以令URL更美观。通常使用小写，只能包含字母，数字和连字符（-）。</span>
							</div>
							<div class="form-group">
								<label for="category-alias">栏目优先级</label> <input type="number" id="category-alias" name="level" value="${category.level }" class="form-control" placeholder="在此处输入栏目优先级" required
									autocomplete="off"> <span class="prompt-text">优先级决定显示顺序，优先级从0开始，数值越大优先级越小。</span>
							</div>
							<div class="form-group">
								<label for="category-describe">描述</label>
								<textarea class="form-control" id="category-describe" name="description" rows="4" autocomplete="off">${category.description }</textarea>
								<span class="prompt-text">描述会出现在网页的description属性中。</span>
							</div>
							<button class="btn btn-primary" type="submit" name="submit">保存</button>
						</form>
					</div>
				</div>
			</div>
		</div>
	</section>
	<script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath }/js/admin-scripts.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#category").addClass('active');
		})
	</script>
</body>
</html>
